﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/UserMasterPage.master" AutoEventWireup="true"
    CodeFile="Register.aspx.cs" Inherits="User_Register" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="content">
        <h1>
            Register with Flowers For Everyone!</h1>
        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
            <asp:View ID="View1" runat="server">
                <table border="0" cellspacing="0" cellpadding="3">
                    <tr>
                        <td colspan="2">
                            <p>
                                <strong>Your Login Details</strong> (<span class="required">* Required Fields</span>)<br>
                                <span class="smalltext">Your email address will be used for your login. If you are already
                                    a member, please <a href="Login.aspx">Login</a> </span>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            &nbsp;
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="Username" runat="server" Text="Username :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtUsername" runat="server" Width="243px"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                            <div id="cemail" style="display: none;">
                                Please enter your email address</div>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblPassword1" runat="server" Text="Password :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtPassword1" runat="server" Width="240px" TextMode="Password"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                            <div id="cemailtwo" style="display: none;">
                                Please enter your password</div>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblPassword2" runat="server" Text="Retype :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtPassword2" runat="server" Width="238px" TextMode="Password"></asp:TextBox>
                                <span class="smalltext"><span class="required">* </span></span>
                            </p>
                            <div id="cpassword" style="display: none;">
                                Please confirm your password</div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lblErrorUser" runat="server" Text="" ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <p>
                                <strong>Your Personal Details</strong><br>
                                <span class="smalltext">Your details will never be sold,or shared for more information
                                </span>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            &nbsp;
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblGender" runat="server" Text="Gender :"></asp:Label></p>
                        </td>
                        <td>
                            <p>
                                <asp:DropDownList ID="ddlGender" runat="server">
                                    <asp:ListItem>Male</asp:ListItem>
                                    <asp:ListItem>Female</asp:ListItem>
                                </asp:DropDownList>
                                <span class="required">* </span>
                            </p>
                            <div id="ctitle" style="display: none;">
                                Please select your gender</div>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                Identity card :
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtID" runat="server" Width="237px"></asp:TextBox>
                                <span class="required">* </span>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblFullname" runat="server" Text="Fullname :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtFullname" runat="server" Width="237px"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                            <div id="cname" style="display: none;">
                                Please enter your first name</div>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblBirthDay" runat="server" Text="BirthDay(mm/dd/yyyy) :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtBirhtday" runat="server" Width="239px"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                            <div id="csurname" style="display: none;">
                                Please enter your surname</div>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblPhone" runat="server" Text="Phone :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtPhone" runat="server" Width="241px"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                            <div id="cphone" style="display: none;">
                                Please enter your phone number</div>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <p>
                                <asp:Label ID="lblAddress" runat="server" Text="Address :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtAddress" runat="server" Width="243px"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                            <div id="caddress_one" style="display: none;">
                                please enter your address</div>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="right">
                            <p>
                                <asp:Label ID="lblEmail" runat="server" Text="Email :"></asp:Label>
                            </p>
                        </td>
                        <td>
                            <p>
                                <asp:TextBox ID="txtEmail" runat="server" Width="241px"></asp:TextBox>
                                <span class="required">* </span>
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red"></asp:Label>
                            <br />
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                ControlToValidate="txtEmail" ErrorMessage="Wrong email format" 
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                                ValidationGroup="checkEmail"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <p>
                                <asp:Button ID="btnJoinNow" Width="80px" Height="30px" runat="server" Text="Join Now"
                                    OnClick="btnJoinNow_Click" ValidationGroup="checkEmail" /></p>
                        </td>
                    </tr>
                </table>
            </asp:View>
            <asp:View ID="View2" runat="server">
                <div style="text-align: center">
                    <p style="font-size: 18px">
                        You register account successful
                    </p>
                    <a href="Home.aspx">Back to home page</a>
                </div>
            </asp:View>
        </asp:MultiView>
    </div>
</asp:Content>
